# coding=utf-8
# author:xc
# datetime:2018/10/23 10:04

import sys

sys.path.append('/home/www/wine_shop/venv/lib64/python2.7/site-packages')
sys.path.append('/usr/lib64/python2.7')
sys.path.append('/usr/lib64/python2.7/site-packages')
import sys

# coding=utf-8
# author:xc
# datetime:2018/8/17 11:36

from flask import Flask
import redis

PAGE_NUM = 12

pool = redis.ConnectionPool(host='127.0.0.1', port='6379', db=6)
redis = redis.Redis(connection_pool=pool)
from app import util




def create_app():
    app = Flask(__name__)

    from .api import api as apis_blueprint
    app.register_blueprint(apis_blueprint)

    from .admin import admin as admin_blueprint
    app.register_blueprint(admin_blueprint)

    return app
